home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
file_uti
/
advctrl
/
filemgr.frm
< prev
next >
Wrap
Text File
|
1995-03-12
|
12KB
|
422 lines
VERSION 2.00
Begin Form frmFileManager
BackColor = &H00FFFFFF&
Caption = "File Control Multi-Listbox"
ClientHeight = 5595
ClientLeft = 1605
ClientTop = 1545
ClientWidth = 8460
ControlBox = 0 'False
Height = 6000
Icon = FILEMGR.FRX:0000
Left = 1545
LinkTopic = "Form1"
ScaleHeight = 5595
ScaleWidth = 8460
Top = 1200
Width = 8580
Begin AdvDrive ComboBox1
Prop25 = 0 'Click on "..." for About Box
BackColor = &H00FFFFFF&
DriveType = 1 'Drive
Height = 285
Left = 5760
Style = 2 'Dropdown List
TabIndex = 25
Top = 960
Width = 2535
End
Begin CommandButton cmdProperties
Caption = "TextLength"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 7
Left = 4440
TabIndex = 24
Top = 960
Width = 1215
End
Begin CommandButton cmdProperties
Caption = "ClearAll"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 6
Left = 3120
TabIndex = 23
Top = 960
Width = 1215
End
Begin CommandButton cmdProperties
Caption = "Select All"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 5
Left = 1800
TabIndex = 22
Top = 960
Width = 1215
End
Begin AdvSearch Search1
Caption = "Search1"
FileList = 0 'File List
FileType = 0 'Normal files
Height = 4125
Left = 1800
PositionLeft = 0
PositionTop = 0
SizeHeight = 0
SizeWidth = 0
TabIndex = 21
Top = 1320
Width = 6495
End
Begin AdvSystem SysCommands1
Caption = "SysCommands1"
ClipControls = 0 'False
Height = 375
Left = 120
SystemType = 2 'MS DOS Prompt
TabIndex = 20
Top = 5040
Width = 1575
End
Begin CommandButton cmdProperties
Caption = "Selected"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 4
Left = 7080
TabIndex = 18
Top = 600
Width = 1215
End
Begin CommandButton cmdProperties
Caption = "ListText"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 3
Left = 5760
TabIndex = 17
Top = 600
Width = 1215
End
Begin CommandButton cmdProperties
Caption = "SelectCount"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 2
Left = 4440
TabIndex = 16
Top = 600
Width = 1215
End
Begin CommandButton cmdProperties
Caption = "ListIndex"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 1
Left = 3120
TabIndex = 15
Top = 600
Width = 1215
End
Begin CommandButton cmdProperties
Caption = "ListCount"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 0
Left = 1800
TabIndex = 14
Top = 600
Width = 1215
End
Begin TextBox txtAdd
Height = 285
Left = 3480
TabIndex = 2
Text = "c:\*.*"
Top = 180
Width = 4815
End
Begin CheckBox chkFiles
BackColor = &H00FFFFFF&
Caption = "List as files."
Height = 255
Left = 120
TabIndex = 3
Top = 960
Width = 1575
End
Begin Frame Frame1
BackColor = &H00FFFFFF&
Caption = "File Types:"
Height = 2175
Left = 120
TabIndex = 4
Top = 1320
Width = 1575
Begin OptionButton optSelect
BackColor = &H00FFFFFF&
Caption = "All"
Height = 255
Index = 6
Left = 120
TabIndex = 11
Top = 1800
Width = 975
End
Begin OptionButton optSelect
BackColor = &H00FFFFFF&
Caption = "Subdirectory"
Height = 255
Index = 5
Left = 120
TabIndex = 10
Top = 1560
Width = 1335
End
Begin OptionButton optSelect
BackColor = &H00FFFFFF&
Caption = "Volume ID"
Height = 255
Index = 4
Left = 120
TabIndex = 9
Top = 1320
Width = 1215
End
Begin OptionButton optSelect
BackColor = &H00FFFFFF&
Caption = "System"
Height = 255
Index = 3
Left = 120
TabIndex = 8
Top = 1080
Width = 1215
End
Begin OptionButton optSelect
BackColor = &H00FFFFFF&
Caption = "Hidden"
Height = 255
Index = 2
Left = 120
TabIndex = 7
Top = 840
Width = 1215
End
Begin OptionButton optSelect
BackColor = &H00FFFFFF&
Caption = "Read only"
Height = 255
Index = 1
Left = 120
TabIndex = 6
Top = 600
Width = 1215
End
Begin OptionButton optSelect
BackColor = &H00FFFFFF&
Caption = "Normal"
Height = 255
Index = 0
Left = 120
TabIndex = 5
Top = 360
Width = 1215
End
End
Begin AdvCopy DiskCopy1
Caption = "DiskCopy1"
ClipControls = 0 'False
Height = 375
Left = 120
TabIndex = 13
Top = 4440
Width = 1575
End
Begin AdvFormat DiskFormat1
Caption = "DiskFormat1"
ClipControls = 0 'False
Height = 375
Left = 120
TabIndex = 12
Top = 3840
Width = 1575
End
Begin CommandButton cmdExit
Caption = "Exit"
Height = 255
Left = 120
TabIndex = 19
Top = 600
Width = 1575
End
Begin CommandButton cmdAdd
Caption = "Add Search1"
Height = 375
Index = 0
Left = 1800
TabIndex = 1
Top = 120
Width = 1575
End
Begin CommandButton cmdClear
Caption = "Clear Search1"
Height = 375
Index = 0
Left = 120
TabIndex = 0
Top = 120
Width = 1575
End
End
Dim iSelect As Integer
Const MB_ICONINFORMATION = 64
Sub chkFiles_Click ()
If chkFiles.Value = 0 Then
Search1.FileList = 1 ' List Files
Else
Search1.FileList = 0 ' Normal List
End If
End Sub
Sub cmdAdd_Click (Value As Integer)
Dim strReturn As String
Search1.FileType = iSelect
Search1.AddItem txtAdd.Text
DoEvents
End Sub
Sub cmdClear_Click (Value As Integer)
Search1.Clear
End Sub
Sub cmdExit_Click ()
End
End Sub
Sub cmdProperties_Click (Index As Integer)
Dim I As Integer
Dim strTemp As String
Select Case Index
Case 0
MsgBox "ListCount = " & Search1.ListCount
Case 1
MsgBox "ListIndex = " & Search1.ListIndex
Case 2
MsgBox "SelectCount = " & Search1.SelectCount
Case 3
strTemp = Search1.ListText
MsgBox "ListText = " & strTemp
Case 4
For I = 0 To Search1.ListCount - 1
Search1.ListIndex = I
If Search1.Selected <> 0 Then
strTemp = Search1.ListText
MsgBox "Selected = " & strTemp
End If
Next
Case 5
I = Search1.SelectAll
Case 6
I = Search1.SelectClear
Case 7
I = Search1.ListTextLength
MsgBox "TextLength = " & I
End Select
End Sub
Sub ComboBox1_Click ()
Dim strDrive As String
strDrive = ComboBox1.Text
strDrive = Left(strDrive, 3)
strDrive = strDrive & "*.*"
txtAdd.Text = strDrive
End Sub
Sub Form_Load ()
Dim I As Integer
Search1.AddItem "c:\*.*"
I = Search1.FileType
optSelect(I).Value = True
chkFiles.Value = 1
Search1.PositionLeft = 120
Search1.PositionTop = 60
Search1.SizeHeight = 290
Search1.SizeWidth = 445
End Sub
Sub optSelect_Click (Value As Integer)
iSelect = Value
End Sub
Sub Search1_KeyUp (KeyCode As Integer, Shift As Integer)
Dim strMessage As String
Dim strAnswer, strDefVal, strTitle
strTitle = "Search1 Property Demo"
strMessage = "ListText = " & Search1.ListText
MsgBox strMessage, MB_ICONINFORMATION, strTitle
strMessage = "Enter an index value from 0 to " & Search1.ListCount - 1 & "."
strDefVal = "0"
strAnswer = InputBox(strMessage, strTitle, strDefVal)
Search1.ListIndex = CInt(strAnswer)
strMessage = "ListText = " & Search1.ListText
MsgBox strMessage, MB_ICONINFORMATION, strTitle
End Sub